import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/film'
  },
  {
    path: '/film',
    name: 'film',
    component: () => import('@/views/Film')
  },
  {
    path: '/cinema',
    name: 'cinema',
    component: () => import('@/views/Cinema')
  },
  {
    path: '/news',
    name: 'news',
    component: () => import('@/views/News')
  },
  {
    path: '/mine',
    name: 'mine',
    component: () => import('@/views/Mine')
  },
  {
    path: '/city',
    component: () => import('@/components/selectCity')
  },
  {
    path: '/moveDetail/:moveId',
    component: () => import('@/views/MoveDetail')
  },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/components/notFound')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
